package com.base.cn.platform.os.controller.qa.thumb;

import com.base.cn.platform.os.common.controller.BaseController;
import com.base.cn.platform.os.service.qa.thumb.QaThumbBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 问题点赞Controller
 *
 * @author LIZHIPENG
 * @create 2018-05-18 上午 9:19
 */
@RestController
@RequestMapping("/course")
public class QaThumbController extends BaseController {

    @Autowired
    private QaThumbBiz qaThumbBiz;

    /**
     * 问题点赞、取消点赞方法
     * @param questionId 问题ID
     * @param userId 用户ID
     * @return
     */
    @RequestMapping("/thumbQuestion")
    public Map<String, Object> thumbQuestion(@RequestParam("questionId")BigDecimal questionId,
                                             @RequestParam("userId")BigDecimal userId){
        return qaThumbBiz.thumbQuestion(questionId, userId);
    }

}
